{% extends "base.html" %}

{% block title %}Scanning Sigs ({{sysname}}){% endblock %}
{% block heading %}Scanning Sigs ({{sysname}}){% endblock %}

{% block leftmenu %}
	<a href='/scanning'>Map</a><br/>
	<a href='/viewsystem2?name={{sysname}}'>View system</a><br/>
	<a href='/sysnotes?sysname={{sysname}}'>Edit notes</a><br/>
	<a href='/scanningcalc'>Calculator</a><br/>
{% endblock %}

{% block content %}
		<form action='/sigs' method='post'>
		<input type='hidden' name='syskey' value='{{node.key}}' />
		<input type='hidden' name='sysname' value='{{sysname}}' />
		<table>
			<tr class="standard">
				<td>Add sigs:</td>
				<td><input type='text' size='40' name='new_sigs' /></td>
			</tr>
			<tr class="standard">
				<td>&nbsp;</td>
				<td><input type='submit' value='Submit changes' /></td>
			</tr>	
		</table>

		<table>
			<tr class="standard">
				<th>Sig</th>
				<th>Type</th>
				<th>Destination</th>
				<!--
				<th>Claimed</th>
				-->
				<th>Delete</th>
			</tr>
			{% for sig in sigs %}
				<input type='hidden' name='orig_type_{{sig.code}}' value='{{sig.sigtype}}' />
				<input type='hidden' name='orig_dest_{{sig.code}}' value='{{sig.destination}}' />
				<tr class="standard">
					<td>{{sig.code}}</td>
					<td>
						<select name='sigtype_{{sig.code}}'>
							<option {% ifequal 'Unknown' sig.sigtype %}selected='selected' {% endifequal %} value="Unknown">Unknown</option>
							<option {% ifequal 'Wormhole' sig.sigtype %}selected='selected' {% endifequal %} value="Wormhole">Wormhole</option>
							<option {% ifequal 'Ladar' sig.sigtype %}selected='selected' {% endifequal %} value="Ladar">Ladar</option>
							<option {% ifequal 'Gravimetric' sig.sigtype %}selected='selected' {% endifequal %} value="Gravimetric">Gravimetric</option>
							<option {% ifequal 'Radar' sig.sigtype %}selected='selected' {% endifequal %} value="Radar">Radar</option>
							<option {% ifequal 'Magnometric' sig.sigtype %}selected='selected' {% endifequal %} value="Magnometric">Magnometric</option>
							<option {% ifequal 'Anomaly' sig.sigtype %}selected='selected' {% endifequal %} value="Anomaly">Anomaly</option>
						</select>
					</td>
					<td><input type='text' name='dest_{{sig.code}}' value='{{sig.destination}}' /></td>
				<!--
					<td>{{sig.claimed_by}}</td>
				-->
					<td><input type='checkbox' name='delete_{{sig.code}}' /></td>
				</tr>
			{% endfor %}
		</table>
		</form>

{% endblock %}
